home *** CD-ROM | disk | FTP | other *** search
/ Electric Reading Land / Electric Reading Land.iso / erl / !.bat < prev    next >
DOS Batch File  |  1995-04-28  |  6KB  |  286 lines

  1. @ECHO OFF
  2. CLS
  3. REM              Terry E. Mercer may be reached at:
  4. REM              4184 Hilsinger Road, Phoenix, OR 97535
  5. REM              1-503-535-4194 Voice or 1-503-535-8151 Fax/Modem
  6. REM
  7. REM              Micromedia Publishers, Inc. may be reached at:
  8. REM              505 NE 7th, Grants Pass, OR  97526
  9. REM              1-503-474-1111 or 1-503-471-4133 (both Voice) or
  10. REM              1-503-474-2486 or 1-503-471-8836 (both Fax)
  11. REM
  12. REM
  13. ECHO.
  14. ECHO.
  15. ECHO.
  16. ECHO        This Program is to assist in the Installation of programs
  17. ECHO         found on this CD, using the MMPI & PBG CD Rom Launcher
  18. ECHO                 ══════════════════════════════════════════
  19. ECHO                 WRITTEN BY TERRY E. MERCER c 15 April 1995
  20. ECHO         THIS BATCH PROGRAM IS COPYRIGHT PROTECTED, AND MAY BE USED
  21. ECHO      ONLY AS SPECIFIED BY Terry Mercer or MicroMedia Publishers, Inc.
  22. ECHO.
  23. ECHO.
  24. ECHO      NOTE: This program can also Un-Install (Delete and Remove)
  25. ECHO            everything it installs! It has done so safely and
  26. ECHO            perfectly on all of our test systems running DOS 6.xx!
  27. ECHO.
  28. PAUSE
  29. cls
  30. IF !%1==! GOTO NOCHOICE
  31. IF EXIST \%1\INSTALL\INSTALL.EXE GOTO THEIR1
  32. IF EXIST \%1\INSTALL\INSTALL.COM GOTO THEIR2
  33. GOTO BEGIN
  34.  
  35. :THEIR1
  36. CALL \%1\INSTALL\INSTALL.EXE
  37. GOTO RUN
  38.  
  39. :THEIR2
  40. CALL \%1\INSTALL\INSTALL.COM
  41. GOTO RUN
  42.  
  43. :WRONGDOS
  44. ECHO.
  45. ECHO.
  46. ECHO       This Program requires DOS 6.xx or better to run properly.
  47. ECHO               ══════════════════════════════════════════
  48. ECHO.
  49. ECHO       If you see this message, either you do NOT have MicroSoft
  50. ECHO       DOS v6.xx or the CHOICE command has been deleted. Either
  51. ECHO       copy the Choice command back in your DOS directory, or
  52. ECHO       consult your DOS manual to manually copy the programs to
  53. ECHO       their own directories.
  54. ECHO.
  55. ECHO       We will make one last attempt to install the programs
  56. ECHO       properly... the program you selected will be placed in
  57. ECHO       a directory named MMPI in the C drive ("C:\MMPI>").
  58. ECHO.
  59. PAUSE
  60. GOTO NOCHOICE
  61.  
  62. :NOCHOICE
  63. IF NOT Exist C:\DOS\XCOPY.EXE GOTO NOTHING
  64. IF NOT EXIST !.BAT GOTO NOCD
  65. cd ERL
  66. XCOPY *.* C:\MMPI\*.* /V
  67. ECHO.
  68. ECHO.
  69. ECHO       Remember, only files ending in EXE, COM, and BAT can start
  70. ECHO       programs. Many programs will require running SETUP, if such
  71. ECHO       a file (program) exists.
  72. ECHO.
  73. ECHO.
  74. PAUSE
  75. GOTO RUN1
  76.  
  77. :NOCD
  78. ECHO.
  79. ECHO.
  80. ECHO     You must start this program directly from the CD Rom Drive,
  81. ECHO     from DOS... with your CD as the default drive. Example "D:\>,"
  82. ECHO     where "D" is the letter designating your CD Rom drive.
  83. ECHO.
  84. ECHO                     ...Please try again...
  85. ECHO.
  86. GOTO END
  87.  
  88. :NOTHING
  89. ECHO.
  90. ECHO.
  91. ECHO       The program was not able to correctly access the necessary
  92. ECHO       information to complete the installation to your hard disk.
  93. ECHO.
  94. ECHO       The version of DOS you have on your system is either too
  95. ECHO       old or incomplete. Consult your DOS manual to manually copy
  96. ECHO       the programs to their own directories. We can not guarantee
  97. ECHO       that the programs will work correctly at this point.
  98. ECHO.
  99. ECHO.
  100. GOTO END
  101.  
  102. :BEGIN
  103. ECHO.
  104. ECHO.
  105. ECHO       Please press the letter corresponding to your hard drive
  106. ECHO             (C, D, E, F, and G are valid drive choices)
  107. ECHO.
  108. ECHO.
  109. CHOICE /c:cdefg /n
  110. if errorlevel 5 goto DRIVE5
  111. if errorlevel 4 goto DRIVE4
  112. if errorlevel 3 goto DRIVE3
  113. if errorlevel 2 goto DRIVE2
  114. if errorlevel 1 goto DRIVE1
  115.  
  116. :DRIVE1
  117. md c:\%1
  118. cd %1
  119. xcopy *.* /V c:\%1
  120. cd c:\%1
  121. c:
  122. GOTO RUN
  123.  
  124. :DRIVE2
  125. md d:\%1
  126. cd %1
  127. xcopy *.* /v d:\%1
  128. cd d:\%1
  129. d:
  130. GOTO RUN
  131.  
  132. :DRIVE3
  133. md e:\%1
  134. cd %1
  135. xcopy *.* /v e:\%1
  136. cd e:\%1
  137. e:
  138. GOTO RUN
  139.  
  140. :DRIVE4
  141. md f:\%1
  142. cd %1
  143. xcopy *.* /v f:\%1
  144. cd f:\%1
  145. f:
  146. GOTO RUN
  147.  
  148. :DRIVE5
  149. md g:\%1
  150. cd %1
  151. xcopy *.* /v g:\%1
  152. cd g:\%1
  153. g:
  154. GOTO RUN
  155.  
  156. :RUN
  157. ECHO.
  158. ECHO.
  159. ECHO       Do you want to Run the program from your hard drive NOW?
  160. ECHO.
  161. CHOICE /c:yn /n /t:Y,10
  162. IF ERRORLEVEL 2 GOTO DELET
  163. IF ERRORLEVEL 1 GOTO RUNIT
  164.  
  165. :RUNIT
  166. IF !%1==! GOTO RUN1
  167. GOTO RUN2
  168.  
  169. :RUN1
  170. if not exist mmpi.bat goto Sorry
  171. C:
  172. CD\MMPI
  173. CALL C:\MMPI\mmpi.bat
  174. echo.
  175. echo.
  176. pause
  177. GOTO RUNOVER
  178.  
  179. :RUN2
  180. cd %1
  181. CALL %1
  182. echo.
  183. echo.
  184. pause
  185. GOTO RUNOVER
  186.  
  187. :RUNOVER
  188. echo.
  189. echo.
  190. echo     You may need to run the Setup program (if one exists) before you
  191. echo     can begin the game. Just enter the directory c:\%1 then type
  192. echo     %1 and press ENTER. (Where C: is your hard drive designation).
  193. echo.
  194. echo.
  195. echo.
  196. echo.
  197. pause
  198. goto delet
  199.  
  200. :DELET
  201. IF !%1==! GOTO SORRY
  202. GOTO UNINSTALL
  203.  
  204. :UNINSTALL
  205. IF NOT EXIST C:\DOS\CHOICE.COM GOTO DELET2
  206. ECHO.
  207. ECHO.
  208. ECHO            Are you sure you want to Delete this Program?
  209. ECHO.
  210. CHOICE /c:yn /n /t:Y,60
  211. IF ERRORLEVEL 2 GOTO END
  212. IF ERRORLEVEL 1 GOTO DELET3
  213.  
  214. :DELET2
  215. ECHO.
  216. ECHO.
  217. ECHO       Do you want to Delete this Program from your hard disk?
  218. ECHO.
  219. ECHO       If you DO then press the enter key... if not, hold down
  220. ECHO       the Control (CTRL) key and press the letter C then Y(es).
  221. ECHO.
  222. ECHO.
  223. PAUSE
  224. GOTO DELET3
  225.  
  226. :DELET3
  227. IF EXIST C:\ERL\ERL.EXE GOTO HARDC
  228. IF EXIST D:\ERL\ERL.EXE GOTO HARDD
  229. IF EXIST E:\ERL\ERL.EXE GOTO HARDE
  230. IF EXIST F:\ERL\ERL.EXE GOTO HARDF
  231. IF EXIST G:\ERL\ERL.EXE GOTO HARDG
  232. GOTO SORRY
  233.  
  234. :HARDC
  235. IF NOT EXIST !.BAT GOTO SORRY
  236. C:
  237. CD\ERL
  238. GOTO NEXT
  239.  
  240. :HARDD
  241. IF NOT EXIST !.BAT GOTO SORRY
  242. D:
  243. CD\ERL
  244. GOTO NEXT
  245.  
  246. :HARDE
  247. IF NOT EXIST !.BAT GOTO SORRY
  248. E:
  249. CD\ERL
  250. GOTO NEXT
  251.  
  252. :HARDF
  253. IF NOT EXIST !.BAT GOTO SORRY
  254. F:
  255. CD\ERL
  256. GOTO NEXT
  257.  
  258. :HARDG
  259. IF NOT EXIST !.BAT GOTO SORRY
  260. G:
  261. CD\ERL
  262. GOTO NEXT
  263.  
  264. :NEXT
  265. ECHO        Please wait... this may take a few mintues, depending on
  266. ECHO        the speed of your computer and hard disk drive.
  267. ECHO.
  268. ATTRIB -R *.* /S
  269. ECHO. Y | DEL *.*
  270. CD\
  271. RD ERL
  272. GOTO END
  273.  
  274. :SORRY
  275. echo.
  276. ECHO  Sorry, but this program is not working correctly on your computer.
  277. ECHO  Or has been installed to a directory with a name other than ERL.
  278. ECHO  See your DOS manual or consult a smart friend to Un-Install this.
  279. echo.
  280. echo.
  281. echo.
  282. pause
  283. goto end
  284.  
  285. :end
  286.